package DailyQuestions;

import java.util.Scanner;

/*猴子分桃*/
public class Day28_MonkeyDividePeach {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            long n=sc.nextInt();
            if(n==0){
                break;
            }
            long a=(long)Math.pow(5,n);
            long b=(long)Math.pow(4,n);
            System.out.print(a-4+" ");
            System.out.println(b+n-4);
        }
    }
}
